<!doctype html>
<html class="no-js">
<#include "../../common/header.ftl">
<#include "../../common/common-css.ftl">
<#include "../../common/common-js.ftl"> 
<script src="${basePath}/js/groupGoods/goodslist.js?v=201711021700"></script>
<head>
  <meta charset="utf-8">
  <title>商品查询</title>
  <meta name="description" content="商品查询">
  <meta name="keywords" content="table">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <style type="text/css">
  	body{
  		overflow: auto; 
  	}
  	.left{
		float:left;
		min-width:100px;
		margin-left: 10px;
	}
	.red_text{
		color:red;
	}
	.blue_text{
		color:blue;
	}
	.table-margin{
		margin:5px 3%;
		width:92%;
	}
  </style>
</head>
<body>
    <div class="admin-content-body" style="overflow:auto">
    	<div class="am-g">
	      <form method="post" name="goodsForm" action="${basePath}/goods/queryGoodsForChoose.shtml">
	     	 <input name="pageNo" type="hidden" value="${param.pageNo!1}">
		      <table>
		      	<tr>
		      		<td colspan="4" style="padding-left: 20px;padding-bottom: 20px;">
			      		<div class="am-input-group am-input-group-sm">
				            <input type="text" class="am-form-field" style="width: 300px;" placeholder="请输入款号或商品名" name="keyword" id="keyword" value="${param.keyword!}">
				      		<span class="am-input-group-btn">
				            	<button class="am-btn am-btn-default" type="submit" id="search-button">搜索</button>
				            </span>
			            </div>
		      		</td>
		      	</tr>
		      </table>
	      </form>
      </div>
      <div class="am-g">
      	<div class="am-u-sm-12">
      		<button type="button" id="btnConfirm" class="am-btn am-btn-primary am-round">确认选择</button>
      		&nbsp;&nbsp;
      		<button type="button"  id="btnClose" class="am-btn am-btn-danger am-round">取消</button>
      	</div>
        <div class="am-u-sm-12">
          <!-- <form class="am-form"> -->
            <table class="am-table am-table-bordered am-table-hover am-table-striped am-table-compact">
              <thead>
              <tr>
              	  <th class="table-check "><input type="checkBox" id="checkAll" onclick="checkAll(this)"></th>
              	  <th class="table-type">商品图片</th>
              	  <th class="table-author am-hide-sm-only">商品名称</th>
	              <th class="table-title">款式编码</th> 
	              <th class="table-title">商品类型</th> 
              	  <th class="table-date am-hide-sm-only">商品价格</th>
	              <th class="table-title">商品状态</th>
	              <th class="table-title">季度</th>
              </tr>
              </thead>
              <tbody>
              <#list page.goodsItemList! as goods>
					<tr>
						<td>
						 <input type="checkbox" name="chkIds" onclick="checkOne(this)" class="goods-checkbox"  value="${goods.id!}" 
						 data-price="${goods.price?string('#0.00')}" data-goodsName="${goods.goodsName!}" data-image="${goods.coverImage!}"} />
						 </td>
						<td>
							<#if goods.coverImage??>
								<img  src="${imgUrl+goods.coverImage}" height="50px" width="50px" 
								 data-toggle="modal" data-target="#imgModal" onerror="this.src='${basePath}/images/default_goods.jpg'" />
							<#else>
								<img  src="${basePath}/images/default_goods.jpg" height="50px" width="50px"  data-toggle="modal" data-target="#imgModal"/> 
							</#if>
						</td>
						<td>${goods.goodsName!}</td>
						<td>${goods.styleCode!}</td>
						<td>${goods.typeName!}</td>
						<td>${goods.price?string('#0.00')}</td>
						<td><#if goods.goodsStatus?? && goods.goodsStatus == "sale">在售
							<#elseif goods.goodsStatus?? && goods.goodsStatus == "wait">待售中
							<#elseif goods.goodsStatus?? && goods.goodsStatus == "down"><span class="blue_text">已下架</span>
							<#else><span class="red_text">已删除</span>
							</#if></td>
						<td><#if goods.quarter?? && goods.quarter == 1>春
							<#elseif goods.quarter?? && goods.quarter == 2>夏
							<#elseif goods.quarter?? && goods.quarter == 3>秋
							<#elseif goods.quarter?? && goods.quarter == 4>冬
							<#else>未知
						    </#if>
						</td>
					</tr>
				</#list>
              </tbody>
              <tfoot>
              	<tr>
	              <div class="am-fr">
					<ul class="pager">
						<li><a href="#" onclick="fanye('1')">首页</a></li>
						<#if page.pageNo!=1 > 
						<li><a	href="#" onclick="fanye('${page.prevPage}')">上一页</a></li>
						<#else>
						<li><a>上一页</a></li> 
						</#if>
						<li><a href="#">第${page.pageNo}页/共${page.totalPage}页</a></li>
						<#if (page.nextPage>page.pageNo) >
						<li><a href="#" onclick="fanye('${page.nextPage}')">下一页</a></li>
						<#else>
						<li><a>下一页</a></li>
						</#if>
						<li><a href="#" onclick="fanye('${page.totalPage}')">尾页</a></li>
					</ul>
	              </div>
              	</tr>
              </tfoot>
            </table>
        </div>
      </div>
    </div>
</body>
 <script type="text/javascript">
    var imgUrl = "${imgUrl}";
    var basePath="${basePath}";
	$(function(){
		layui.use(['form', 'layer'], function(){
		  var layer = layui.layer;
		  var form = layui.form(); 
		});
	});
 </script>
</html>
